package enumStudy;

/**
 * @author Cheng Jun
 * @version 1.0
 * @date 2019/11/19 14:09
 */
public enum SeasonEnum {

    /**
     * 春夏秋冬
     */
    SPRING(1, "春"),
    SUMMER(2, "夏"),
    AUTUMN(3, "秋"),
    WINTER(4, "冬") {
        // 枚举类的枚举实例，重写
        public int getCode() {
            return 4444;
        }
    };

    private int code;

    private String chineseName;

    SeasonEnum(int code, String chineseName) {
        this.code = code;
        this.chineseName = chineseName;
    }

    public int getCode() {
        return code;
    }

    public String getChineseName() {
        return chineseName;
    }
}
